{"ast":null,"code":"export function getValidateContainer(nodeRoot) {\n  if (nodeRoot instanceof Document) {\n    return nodeRoot.body;\n  }\n  return Array.from(nodeRoot.childNodes).find(ele => (ele === null || ele === void 0 ? void 0 : ele.nodeType) === Node.ELEMENT_NODE);\n}\nexport function isNotGrey(color) {\n  // eslint-disable-next-line no-useless-escape\n  const match = (color || '').match(/rgba?\\((\\d*), (\\d*), (\\d*)(, [\\d.]*)?\\)/);\n  if (match && match[1] && match[2] && match[3]) {\n    return !(match[1] === match[2] && match[2] === match[3]);\n  }\n  return true;\n}\nexport function isValidWaveColor(color) {\n  return color && color !== '#fff' && color !== '#ffffff' && color !== 'rgb(255, 255, 255)' && color !== 'rgba(255, 255, 255, 1)' && isNotGrey(color) && !/rgba\\((?:\\d*, ){3}0\\)/.test(color) &&\n  // any transparent rgba color\n  color !== 'transparent';\n}\nexport function getTargetWaveColor(node) {\n  const {\n    borderTopColor,\n    borderColor,\n    backgroundColor\n  } = getComputedStyle(node);\n  if (isValidWaveColor(borderTopColor)) {\n    return borderTopColor;\n  }\n  if (isValidWaveColor(borderColor)) {\n    return borderColor;\n  }\n  if (isValidWaveColor(backgroundColor)) {\n    return backgroundColor;\n  }\n  return null;\n}","map":{"version":3,"names":["getValidateContainer","nodeRoot","Document","body","Array","from","childNodes","find","ele","nodeType","Node","ELEMENT_NODE","isNotGrey","color","match","isValidWaveColor","test","getTargetWaveColor","node","borderTopColor","borderColor","backgroundColor","getComputedStyle"],"sources":["/data/messenger.client/node_modules/antd/es/_util/wave/util.js"],"sourcesContent":["export function getValidateContainer(nodeRoot) {\n  if (nodeRoot instanceof Document) {\n    return nodeRoot.body;\n  }\n  return Array.from(nodeRoot.childNodes).find(ele => (ele === null || ele === void 0 ? void 0 : ele.nodeType) === Node.ELEMENT_NODE);\n}\nexport function isNotGrey(color) {\n  // eslint-disable-next-line no-useless-escape\n  const match = (color || '').match(/rgba?\\((\\d*), (\\d*), (\\d*)(, [\\d.]*)?\\)/);\n  if (match && match[1] && match[2] && match[3]) {\n    return !(match[1] === match[2] && match[2] === match[3]);\n  }\n  return true;\n}\nexport function isValidWaveColor(color) {\n  return color && color !== '#fff' && color !== '#ffffff' && color !== 'rgb(255, 255, 255)' && color !== 'rgba(255, 255, 255, 1)' && isNotGrey(color) && !/rgba\\((?:\\d*, ){3}0\\)/.test(color) &&\n  // any transparent rgba color\n  color !== 'transparent';\n}\nexport function getTargetWaveColor(node) {\n  const {\n    borderTopColor,\n    borderColor,\n    backgroundColor\n  } = getComputedStyle(node);\n  if (isValidWaveColor(borderTopColor)) {\n    return borderTopColor;\n  }\n  if (isValidWaveColor(borderColor)) {\n    return borderColor;\n  }\n  if (isValidWaveColor(backgroundColor)) {\n    return backgroundColor;\n  }\n  return null;\n}"],"mappings":"AAAA,OAAO,SAASA,oBAAoB,CAACC,QAAQ,EAAE;EAC7C,IAAIA,QAAQ,YAAYC,QAAQ,EAAE;IAChC,OAAOD,QAAQ,CAACE,IAAI;EACtB;EACA,OAAOC,KAAK,CAACC,IAAI,CAACJ,QAAQ,CAACK,UAAU,CAAC,CAACC,IAAI,CAACC,GAAG,IAAI,CAACA,GAAG,KAAK,IAAI,IAAIA,GAAG,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,GAAG,CAACC,QAAQ,MAAMC,IAAI,CAACC,YAAY,CAAC;AACpI;AACA,OAAO,SAASC,SAAS,CAACC,KAAK,EAAE;EAC/B;EACA,MAAMC,KAAK,GAAG,CAACD,KAAK,IAAI,EAAE,EAAEC,KAAK,CAAC,yCAAyC,CAAC;EAC5E,IAAIA,KAAK,IAAIA,KAAK,CAAC,CAAC,CAAC,IAAIA,KAAK,CAAC,CAAC,CAAC,IAAIA,KAAK,CAAC,CAAC,CAAC,EAAE;IAC7C,OAAO,EAAEA,KAAK,CAAC,CAAC,CAAC,KAAKA,KAAK,CAAC,CAAC,CAAC,IAAIA,KAAK,CAAC,CAAC,CAAC,KAAKA,KAAK,CAAC,CAAC,CAAC,CAAC;EAC1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